package cn.itsource.ymcc.errorcode;

/** 系统错误码 **/
public enum ErrorCode {

    SYSTEM_ERROR(1001,"系统内部异常"),
    SERVICE_CALL_ERROR(2001,"很抱歉，服务正在升级"),
    IMG_CODE_IS_EMPTY(3001,"请填写图片验证码"),
    IMG_CODE_EXPIRED(3002,"验证码已过期"),
    IMG_CODE_INPUT_ERROR(3003,"图片验证码输入错误"),
    NOT_KEEP_CLICKING(3004,"请不要频繁点击"),
    PHONE_REGISTERED(3005,"手机号已被注册"),
    PHONE_CODE_EXPIRE(3007,"手机验证码已过期"),
    PHONE_CODE_INPUT_ERROR(3006,"手机验证码输入错误"),

    ON_LINE_COURSE_ERROR(4001,"亲~  所勾选的课程都是已上架的哦"),
    OFF_LINE_COURSE_ERROR(4002,"亲~  所勾选的课程都是已下架的哦"),
    GET_COURSE_DETAIL_ERROR(5001,"获取课程信息失败"),
    GET_MEDIA_DETAIL_ERROR(5002,"获取课程视频信息失败"),
    MEDIA_NOT_BUY(5003,"视频没有购买，请购买后再观看"),

    ILLEGAL_REQUEST(5004,"非法请求"),
    ;
    //错误码
    private Integer code;
    //错误信息
    private String message;

    ErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message+"["+code+"]";
    }
}